from typing import List
from fastapi import HTTPException, status
import json
from sqlalchemy.orm import Session
from table.user_role import UserRole as UserRoleTable
from paramsModel.common import Page
from common.response import CustomPageResponse


# 用户的权限逻辑
class UserRole:
    @classmethod
    def add(cls,db: Session,info:UserRoleTable):
       db.add(UserRoleTable(**info))
       db.commit()
